﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DynCMS.NET.Core.Entities.Base;

namespace DynCMS.NET.Core.Entities
{
    /// <summary>
    /// Represents web page
    /// </summary>
    public class Page : DynCMS.NET.Core.Entities.Base.PersistableEntity
    {
        /// <summary>
        /// Gets or sets the url.
        /// </summary>
        /// <value>The url.</value>
        public string Url { get; set; }

        /// <summary>
        /// Gets or sets complete url, including all parent pages
        /// </summary>
        public string ParentUrl { get; set; }

        /// <summary>
        /// Get or sets LCID of page language
        /// </summary>
        public int LanguageLCID { get; set; }

        /// <summary>
        /// Parent page
        /// </summary>
        public virtual Page Parent { get; set; }

        /// <summary>
        /// Children pages
        /// </summary>
        public virtual ICollection<Page> Children { get; set; }

        /// <summary>
        /// Sections on page
        /// </summary>
        public virtual List<Section> Sections { get; set; }
    }
}